<template>
  <div class="demo-block">
    <div class="source">
      <slot name="default"></slot>
    </div>
    <div class="meta">
      <slot name="code">
        <Code :code="code" />
      </slot>
    </div>
  </div>
</template>

<script>
import Code from "./Code";
export default {
  components: {
    Code,
  },
  props: {
    code: {
      type: String,
      default: "",
    },
  },
};
</script>

<style lang="scss">
.demo-block {
  border: 1px solid #ebebeb;
  border-radius: 3px;
  margin-bottom: 24px;
  .source {
    padding: 24px;
  }
  .meta {
    background-color: #fafafa;
    border-top: 1px solid #eaeefb;
  }
}
</style>
